#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long a,b;
	cin>>a>>b;
	if(a%2&&b%2)
	cout<<a*a<<" "<<b*b;
	else if(a%2==0&&b%2==0)
	cout<<a*a*a<<" "<<b*b*b;
	else cout<<a<<" "<<b;
    return 0;
}
